<?php

namespace Application\Model\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Project
 *
 * @ORM\Table(name="project", indexes={@ORM\Index(name="fk_Projecs_User_idx", columns={"Users_Id"}), @ORM\Index(name="fk_Projecs_Category1_idx", columns={"Category_Id"}), @ORM\Index(name="fk_Projects_Statuses1_idx", columns={"Statuses_Id"})})
 * @ORM\Entity
 */
class Project
{
    /**
     * @var integer
     *
     * @ORM\Column(name="Id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="Title", type="string", length=45, nullable=false)
     */
    private $title;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="DateOfCreate", type="datetime", nullable=true)
     */
    private $dateofcreate;

    /**
     * @var boolean
     *
     * @ORM\Column(name="Published", type="boolean", nullable=true)
     */
    private $published;

    /**
     * @var string
     *
     * @ORM\Column(name="Description", type="text", nullable=true)
     */
    private $description;

    /**
     * @var string
     *
     * @ORM\Column(name="ShortDescription", type="text", nullable=true)
     */
    private $shortdescription;

    /**
     * @var string
     *
     * @ORM\Column(name="Logo", type="string", length=255, nullable=true)
     */
    private $logo;

    /**
     * @var \Application\Model\Entity\Category
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\Category")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Category_Id", referencedColumnName="Id")
     * })
     */
    private $category;

    /**
     * @var \Application\Model\Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Users_Id", referencedColumnName="Id")
     * })
     */
    private $users;

    /**
     * @var \Application\Model\Entity\Status
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\Status")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Statuses_Id", referencedColumnName="Id")
     * })
     */
    private $statuses;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Application\Model\Entity\Image", mappedBy="projecs")
     */
    private $images;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Application\Model\Entity\Film", mappedBy="projects")
     */
    private $films;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Application\Model\Entity\Linktofile", mappedBy="projects")
     */
    private $linkstofiles;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->images = new \Doctrine\Common\Collections\ArrayCollection();
        $this->films = new \Doctrine\Common\Collections\ArrayCollection();
        $this->linkstofiles = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Project
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set dateofcreate
     *
     * @param \DateTime $dateofcreate
     * @return Project
     */
    public function setDateofcreate($dateofcreate)
    {
        $this->dateofcreate = $dateofcreate;

        return $this;
    }

    /**
     * Get dateofcreate
     *
     * @return \DateTime 
     */
    public function getDateofcreate()
    {
        return $this->dateofcreate;
    }

    /**
     * Set published
     *
     * @param boolean $published
     * @return Project
     */
    public function setPublished($published)
    {
        $this->published = $published;

        return $this;
    }

    /**
     * Get published
     *
     * @return boolean 
     */
    public function getPublished()
    {
        return $this->published;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Project
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set shortdescription
     *
     * @param string $shortdescription
     * @return Project
     */
    public function setShortdescription($shortdescription)
    {
        $this->shortdescription = $shortdescription;

        return $this;
    }

    /**
     * Get shortdescription
     *
     * @return string 
     */
    public function getShortdescription()
    {
        return $this->shortdescription;
    }

    /**
     * Set logo
     *
     * @param string $logo
     * @return Project
     */
    public function setLogo($logo)
    {
        $this->logo = $logo;

        return $this;
    }

    /**
     * Get logo
     *
     * @return string 
     */
    public function getLogo()
    {
        return $this->logo;
    }

    /**
     * Set category
     *
     * @param \Application\Model\Entity\Category $category
     * @return Project
     */
    public function setCategory(\Application\Model\Entity\Category $category = null)
    {
        $this->category = $category;

        return $this;
    }

    /**
     * Get category
     *
     * @return \Application\Model\Entity\Category 
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Set users
     *
     * @param \Application\Model\Entity\User $users
     * @return Project
     */
    public function setUsers(\Application\Model\Entity\User $users = null)
    {
        $this->users = $users;

        return $this;
    }

    /**
     * Get users
     *
     * @return \Application\Model\Entity\User 
     */
    public function getUsers()
    {
        return $this->users;
    }

    /**
     * Set statuses
     *
     * @param \Application\Model\Entity\Status $statuses
     * @return Project
     */
    public function setStatuses(\Application\Model\Entity\Status $statuses = null)
    {
        $this->statuses = $statuses;

        return $this;
    }

    /**
     * Get statuses
     *
     * @return \Application\Model\Entity\Status 
     */
    public function getStatuses()
    {
        return $this->statuses;
    }

    /**
     * Add images
     *
     * @param \Application\Model\Entity\Image $images
     * @return Project
     */
    public function addImage(\Application\Model\Entity\Image $images)
    {
        $this->images[] = $images;

        return $this;
    }

    /**
     * Remove images
     *
     * @param \Application\Model\Entity\Image $images
     */
    public function removeImage(\Application\Model\Entity\Image $images)
    {
        $this->images->removeElement($images);
    }

    /**
     * Get images
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getImages()
    {
        return $this->images;
    }

    /**
     * Add films
     *
     * @param \Application\Model\Entity\Film $films
     * @return Project
     */
    public function addFilm(\Application\Model\Entity\Film $films)
    {
        $this->films[] = $films;

        return $this;
    }

    /**
     * Remove films
     *
     * @param \Application\Model\Entity\Film $films
     */
    public function removeFilm(\Application\Model\Entity\Film $films)
    {
        $this->films->removeElement($films);
    }

    /**
     * Get films
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getFilms()
    {
        return $this->films;
    }

    /**
     * Add linkstofiles
     *
     * @param \Application\Model\Entity\Linktofile $linkstofiles
     * @return Project
     */
    public function addLinkstofile(\Application\Model\Entity\Linktofile $linkstofiles)
    {
        $this->linkstofiles[] = $linkstofiles;

        return $this;
    }

    /**
     * Remove linkstofiles
     *
     * @param \Application\Model\Entity\Linktofile $linkstofiles
     */
    public function removeLinkstofile(\Application\Model\Entity\Linktofile $linkstofiles)
    {
        $this->linkstofiles->removeElement($linkstofiles);
    }

    /**
     * Get linkstofiles
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLinkstofiles()
    {
        return $this->linkstofiles;
    }
}
